<?php
if(isset($_SESSION["users_id"]) && $_SESSION["group_id"]==1){
	$IDNews=$_GET["IDNews"];
	settype($IDNews,"int");
	DeleteNews($IDNews);
    $check=CheckTitle($IDNews);
    if(mysql_num_rows($check)!=0){
        header("location:index.php?p=editnews&IDNews=<?php echo $IDNews; ?>");
    }
	header("location:index.php?p=newslistcp");
}else{
	header("location:index.php?p=logincp");
}
?>